package com.tricode.ile.training.task.one.getminimumfromarray;


public class GetMinimumElementFromArray {
	
	/**
	 * @param newArray is the array
	 * @return the minimum element from the array a given above
	 */
	int getMinimum(int[] newArray) {
		int min = newArray[0];

		for (int i = 0; i < newArray.length; i++) {
			if (newArray[i] < min) {
				min = newArray[i];
			}
		}
		return min;
	}

}
